﻿namespace UnityEngine
{
    using System;
    using System.Runtime.CompilerServices;

    public sealed class ADInterstitialAd
    {
        private IntPtr iAdWrapper;

        public ADInterstitialAd()
        {
            this.InitWrapper();
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern void CancelAction();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void Destroy();
        ~ADInterstitialAd()
        {
            this.Destroy();
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        private extern void InitWrapper();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        public extern bool Present();

        private bool _actionInProgress;
        public bool actionInProgress { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get { return _actionInProgress; } }

        public ADError error { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool loaded { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }

        public bool visible { [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall] get; }
    }
}

